export default {
    namespaced:true,
    actions:{},
    mutations:{
        changeShow(state){
            state.isShow = !state.isShow;
            state.ico = state.ico == 'el-icon-s-fold' ? 'el-icon-s-unfold' : 'el-icon-s-fold';
        },
        
        //利用浏览器本地存储设置和切换头部不标题
        setTitle(state,value){
            sessionStorage.setItem('title',state.menu[value].label);
        },
        changeTitle(state){
            state.title = sessionStorage.getItem('title');
        },
    },
    state:{
        isShow:false,
        ico:'el-icon-s-fold',
        menu:[{
                path:'/home',
                name:'Home',
                label:'首页',
                icon:'s-home',
                url:'Home/Home',
            },{
                path:'/goods',
                name:'Goods',
                label:'商品管理',
                icon:'goods',
                url:'MallManage/MallManage',
            },{
                path:'/order',
                name:'Order',
                label:'订单管理',
                icon:'user',
                url:'OrderManage/OrderManage',
            }],
        title:'首页',
    },
}
